<?php $sessao = new Zend_Session_Namespace('Parametros'); ?>
<?php 

?>
<html lang="pt-br">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body>
    <div class="pagina">
    <?php
    $count = 0;
    $total = count($this->texto) - 1;
    foreach($this->texto as $key => $row) {
        
        $img = '';
        $imgs = 'public/upload/aluno/'.$row['ALU_ID'].'_crt.*';
        foreach (glob($imgs) as $src) {
            $img = $src;
        }
        if(strlen($img) > 6){
            $count++;
    ?>
        <div class="carteirinha">
            
            <div class="frente">
                <div class="titulo">CARTEIRA DE IDENTIFICAÇÃO ALUNO GARRA</div>
                <table class="dados_alunos">
                    <tr>
                        <td>
                            <label>ALUNO</label>
                            <span><?php echo $row['ALU_NOM']; ?></span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label>CPF</label>
                            <span><?php echo $row['ALU_CPF']; ?></span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label>MATRÍCULA</label>
                            <span><?php echo $row['MAT_ID']; ?></span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label>CURSO</label>
                            <span><?php echo $row['CBS_NOM'].'&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;'.$row['NRT_NOM'].'&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;'.$row['CUR_ANO']; ?></span>
                        </td>
                    </tr>
                </table>
                
                
                <div class="foto_aluno">
                    <?php if(strlen($img) > 5){ ?>
                        <img class="logo" src="<?php echo '/'.$img; ?>" />
                    <?php } ?>
                </div>
                
                <div class="cnt_logo_cart">
                    Pré-Vestibular
                    <img class="logo_cart" src="/public/media/images/logo_cart.png" />
                    <?php echo $sessao->parametros['PAR_NOM']; ?>
                </div>
                
                <div class="site"><span>sistemagarra</span>.com.br</div>
                
                <div class="validade">Validade <?php echo Datetools::amd_dma($row['CUR_DATFIM']); ?></div>
                
            </div>
            
        </div>
        
    <?php 
        }
    } ?>
        
    </div>
<style>

@font-face{ 
    font-family: 'MyriadProBold';
    src: url('<?php echo $this->urlbase?>/public/media/fonts/MyriadPro-BoldCond.otf'); 
}

@font-face{ 
    font-family: 'MyriadPro';
    src: url('<?php echo $this->urlbase?>/public/media/fonts/MyriadPro-Regular.otf'); 
}

@font-face{ 
    font-family: 'MyriadProLight';
    src: url('<?php echo $this->urlbase?>/public/media/fonts/MyriadPro-Light.otf'); 
}

@font-face{ 
    font-family: 'Century Gothic';
    src: url('<?php echo $this->urlbase?>/public/media/fonts/Century Gothic.ttf'); 
}

html, body{
    margin: 0px;
    padding: 0px;
}

.pagina{
    width: 325px;
    text-align: center;
    color:#FFF;
    overflow: hidden;
}  
/* 
325.039370079
204.094488189
*/
.carteirinha{
    float: left;
    background-color: #A43030;
    width: 304.5px;
    height: 183px;
    padding: 5px;
    margin: 5px;
    border-radius: 7px;
}

.espaco{
    display: block;
    height: 296.7px;
    clear: both;
}
.espaco2{
    display: block;
    height: 1px;
    clear: both;
}

.frente{
    font-family: 'MyriadProBold'; 
    font-size: 6px;
    overflow: hidden;
    height: 182px;
}

.verso{
    font-family: 'MyriadPro';
    font-size: 4px;
    overflow: hidden;
    height: 4.8cm; // 5cm
    padding-top: 0.20cm; // 
}

.titulo{
    font-family: 'Century Gothic'; 
    font-size: 10px;//7.5px;
    text-align: center;
    margin-top: 2px;
    margin-bottom: 2px;
}
.dados_alunos{
    font-size: 10px;//6px;
    float: left;
}
.dados_alunos label{
    font-weight: bold;
    color:#FFF;
    margin-left: 5px;
}
.dados_alunos span{
    font-size: 12px;
    width: 205px;
    padding-top: 2px;
    padding-bottom: 1px;
    padding-left: 5px;
    height: 16px;
    border-radius: 5px;
    display: block;
    background-color: #FFF;
    color:#000 !important;
    text-transform: uppercase;
    margin-bottom: -2px;
    margin-top: -2px;
}
.site{
    float: left;
    width: 100px;
    text-align: left;
    margin-top: 24px;
    margin-left: 2px;
    font-size: 10px;
    font-family: 'MyriadProLight';
}
.site span{
    font-weight: bold;
    font-family: 'MyriadProBold'; 
}
.validade{
    float: left;
    width: 106px;
    text-align: right;
    margin-top: 6px;
    margin-left: 2px;
    font-size: 10px;
    font-family: 'MyriadProLight';
}
.foto_aluno{
    float: right;
    width: 75px;
    height: 95px;
    border-radius: 5px;
    background-color: #FFF;     
    margin-top: 12px;
    overflow: hidden;
    margin-right: 5px; 
}
.cnt_logo_cart{
    float: right;
    width: 69px;
    text-align: center;
    margin-top: 12px;
    margin-right: 6px;
    font-size: 9px;
}
.logo_cart{
    width: 69px;
}
</style>
<script>  
window.print(); 
</script>

<body>
</html>
